package com.example.mapper;

import com.example.entity.Attendance;
import com.example.entity.Travel;
import com.example.entity.dto.AttendanceDto;
import com.example.entity.dto.AttendanceSearch;
import com.example.entity.vo.AttDataVO;
import com.example.entity.vo.AttVO;
import com.example.entity.vo.AttendanceVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

@Mapper
public interface AttendanceMapper {


    void add(Attendance attendance);

    AttendanceVO findAtt(int id);

    List<AttendanceVO> findAllAtt(Date date);

    void updateAtt(Attendance attendance);

    @Delete("DELETE FROM attendance where id = #{id}")
    void deleteAtt(int id);

    List<AttendanceVO> search(AttendanceSearch attendanceSearch);

    AttVO findAttData(@Param("employeeId") int employeeId, @Param("data") String date);

    List<AttDataVO> findAttWorkingData(@Param("employeeId") int employeeId, @Param("data") String date);

    List<AttDataVO> findAttOverData(@Param("employeeId") int employeeId, @Param("data") String date);

    Attendance find(@Param("employeeId") Integer integer, @Param("data")  String time);
}
